<template>
  <div class="my-prop-sync">
     使用sync双向绑定的数据 {{myMsg}} 
     <button @click="fn">子传父</button>
    </div>
</template>
<script>
export default {
  name: 'my-prop-sync',
  props: ['myMsg'],
  methods: {
  	fn () {
      this.$emit('update:myMsg', '子组件数据')
    }
	}
}
</script>